home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13746 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.4 KB

  1. Path: news.internet.com.mx!usenet
  2. From: elask@internet.com.mx
  3. Newsgroups: comp.lang.c++
  4. Subject: Comunications using RS-232, OWL,I cant read a complete data stream using EV_RXFLAG
  5. Date: 27 Mar 1996 04:59:16 GMT
  6. Organization: Internet de Mexico S.A. de C.V.
  7. Message-ID: <4jahv4$fqu@news.internet.com.mx>
  8. NNTP-Posting-Host: inter023.internet.com.mx
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.22 (Windows; I; 16bit)
  13.  
  14.  
  15.      Anyone could help me?
  16.  
  17.      First, I dont speak English well, so please try to understand what I 
  18. want to say.
  19.      I'm studying electronic engineering and my final work (Thesis) is a 
  20. project that consist in: a processor (MC68HC11) that must sense four 
  21. pressures and process them to control a fan. The data acquired with this 
  22. processor must be send to a computer. I'm a C/C++ programer and I bought 
  23. Borland C++ v.4.01 to make my PC programs. I must to do one version for 
  24. DOS and one another for Windows. The communication between the HC11 
  25. processor and PC is RS-232. I'm prgraming in Windows with Comm. events.
  26.     My data consist in one start byte(0x10), five data(4 bytes each), and 
  27. one final byte(End mark: 0x11), 22 bytes total transmited each second. I 
  28. use Notification functions (OWL's EnableCommNotify(HmyWindow,22,-1) 
  29. communications functions(OWL's SetEventMask(EV_TXFLAG)), etc..
  30. I set the fEvt bit and I specify EvtChar as 0x10(the first byte in the 
  31. comunication stream, this to notify my program about incoming data). First 
  32. I turned off fBinary bit, and I can'd receive any data. Then I turned on 
  33. this flag, so I can receive data, but not complete. My program recognizes 
  34. the EV_RXFLAG but does not receive the 22 bytes of my data stream. So I 
  35. specify EofChar as 0x11(the last byte in the stream, the End Mark), and 
  36. the problem is the same.     
  37. The problem is that I can only receive this Com event when I turn on the 
  38. fBinary bit in the tagDCB structure and the data stream is not received 
  39. correctly(in fact, only three bytes can I read using 
  40. ReadComm(Id,*lpBuffer,22). Why can't I read my complete data stream?. Thus 
  41.  when the response function enters, suddenly enters again and don't wait 1 
  42.  second(time between transmissions), after this second entry the response 
  43. funtion enters after a second.
  44.     
  45.  
  46.                       My name is Tomas Covarrubias V.
  47.                       E-Mail address: elask@internet.com.mx
  48.  
  49.